<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"  isELIgnored="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="chtml" uri="http://www.szhelper.com/jsp/html"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>修改活动</title>
<style type="text/css">
.rolelist {
	float: left;
	overflow: hidden;
	height: 190px;
}

.rolelist_right {
	float: left;
	overflow: hidden;
	height: 190px;
}

.center {
	margin: 20px, 20px, 20px, 20px;
	float: left;
	overflow: hidden;
	height: 190px;
	width: 130px;
	text-align: center;
}

.role {
	margin-bottom: 10px;
	margin-top: 10px;
	overflow: hidden;
}
</style>
<script type="text/javascript">
	function onsubmits() {
		var group_select = document.getElementById("appUserCreate_appuser_group_sel");
		for ( var i = 0; i < group_select.length; i++) {
			group_select.options[i].selected = true;
		}
		return true;
	}
	$(function(){
		$('#startDate').attr('readonly','readonly'); 
		$('#endDate').attr('readonly','readonly'); 
	});
</script>
</head>
<body>
<div class="youarehere">活动管理 &gt;<span>活动列表</span>&gt; <span>修改活动</span></div>
	<chtml:command command="activity" title="修改"
		exclude="id,isMultilevel,isIncrease,onePersonRewardLimit,totalRewardLimit,activityLimitTimes,conditionVal" onSubmit="onsubmits()"
		action="/activity/update" column="2">
		<chtml:property index="-1" label="奖品列表">
			<div class="role">
				<div class="rolelist">
					<SELECT tabindex="1" id="appUserCreate_appuser_group"
						NAME="appUserCreate_appuser_group" multiple="multiple" SIZE=12
						style="width: 130px;">
						<c:forEach items="${requestScope.rewardListAll}" var="reward">
							<option value="${reward.id }">${reward.rewardName }</option>
						</c:forEach>
					</SELECT>
				</div>
			<div class="center">
					<br> <br> <a href="#"
						onclick="javascript:helper.fun.moveSelectItem('appUserCreate_appuser_group','appUserCreate_appuser_group_sel');">添加</a><br>
					<br> <a href="#"
						onclick="javascript:helper.fun.moveSelectItem('appUserCreate_appuser_group_sel','appUserCreate_appuser_group');">移除</a>
				</div>

				<div class="rolelist_right">
					<SELECT tabindex="1" id="appUserCreate_appuser_group_sel"
						name="rewards" multiple="multiple" SIZE=12 style="width: 130px;">
						<c:forEach items="${activity.rewards}" var="group">
							<option value="${group.id }">${group.rewardName }</option>
						</c:forEach>
					</SELECT>
				</div>
			</div>
			<input name="id" type="hidden" value="${activity.id }" />
		</chtml:property>
		
		<chtml:button destination="/activity/update" showText="更新"></chtml:button>
	</chtml:command>
</body>
</html>